

<%@page import="dao.ThuongHieu_dao"%>
<%@page import="pojo.ThuongHieu_pojo"%>
<%@page import="dao.LoaiSanPham_dao"%>
<%@page import="pojo.LoaiSanPham_pojo"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%ArrayList<LoaiSanPham_pojo> dsloaisanpham=LoaiSanPham_dao.LayToanBoDanhSach(); %>

<form action="themsanpham_controller"  enctype="multipart/form-data" method="post"  name="form1" id="form1">
<table width="100%" border="0">
    <tr>
    <td colspan="2" align="center"><strong><font color="#FF0000">THÊM SẢN PHẨM MỚI</font></strong></td>
    </tr>
    <tr>
    <td>Hình Ảnh Sản Phẩm:</td>
    <td>
      <input type="file" name="file" id="file" />
    </td>
  </tr>      
  <tr>
    <td>Mã Sản Phẩm:</td>
    <td><input type="text" name="txtmasanpham" id="txtmasanpham"  /></td>
  </tr>
  <tr>
    <td width="150px">Tên Sản Phẩm:</td>
    <td width=""><input type="text" name="txttensanpham" id="txttensanpham" /></td>
  </tr>
  <tr>
    <td>Loại sản Phẩm:</td>
    <td>
        <select name="cbloaisanpham" id="cbloaisanpham">
            <%for(int i=0;i<dsloaisanpham.size();i++){ %>
            <option value="<%=dsloaisanpham.get(i).getMaLoaiSanPham() %>"><%=dsloaisanpham.get(i).getTenLoaiSanPham() %></option><%}%>
        
      </select>
  </td>
  </tr>
  <tr>
    <td>Thương Hiệu:</td>
    <td>
        <%ArrayList<ThuongHieu_pojo> ds_thuonghieu = ThuongHieu_dao.LayToanBo(); %>
      <select name="cbthuonghieu" id="cbthuonghieu">
         <%for(int i =0;i<ds_thuonghieu.size();i++){ %> 
         <option value="<%=ds_thuonghieu.get(i).getMaThuongHieu() %>"><%=ds_thuonghieu.get(i).getTenThuongHieu() %></option><%}%>
      </select>
  </td>
  </tr>
  <tr>
    <td>Số Lượng Tồn:</td>
    <td>
      <input type="text" name="txtsoluongton" id="txtsoluongton" /></td>
  </tr>
  <tr>
    <td>Kích Thước:</td>
    <td>
      <input type="text" name="txtkichthuoc" id="txtkichthuoc" /></td>
  </tr>
  <tr>
    <td>Giá :</td>
    <td>
      <input type="text" name="txtgia" id="txtgia" />(KVND)</td>
  </tr>
  
  <tr>
    <td valign="top">Một số chỉ tiết khác:</td>
    <td><textarea name="txtchitiet" id="txtchitiet" cols="45" rows="5"></textarea></td>
  </tr>
  <tr>
    <td colspan="2">
        <input type="submit" name="btthem" id="btthem" value="Thêm" />
        <input type="hidden" name="action" value="themsanphammoi">
    </td>
    
    </tr>
</table>
</form>
